# -*- coding: utf-8 -*-
from django import forms
from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from django.forms.widgets import ChoiceWidget, Select
from xadmin.widgets import AdminSelectWidget, AdminTextInputWidget
import json
from .models import Good, GoodMultimedia
from page.widgets import Qrcode, ScanSelect


class GoodForm(forms.ModelForm):
    class Meta:
        model = Good
        exclude = []
        widgets = {
            'code': Qrcode,
        }


class GoodMultimediaForm(forms.ModelForm):
    class Meta:
        model = GoodMultimedia
        exclude = []
        widgets = {
            'fk_good': ScanSelect,
        }


